@isTest

private class testsetmanagerformdHCP {
    
    static testMethod void testTrigger() {
        String rtid;
        Profile p  = [select id from profile where name=: 'System Administrator'];    
        User u3 =new User (alias = 'new', email = 'shlia@isoftstone.com', emailencodingkey='UTF-8', lastname = 'Testing', languagelocalekey = 'en_US', localesidkey='en_US', profileid = p.id, timezonesidkey = 'Asia/Shanghai', username='new3@testorg1.com');
        insert u3;
        User u1 =new User (alias = 'standt', email = 'shlia@isoftstone.com', emailencodingkey='UTF-8', lastname = 'Testing', languagelocalekey = 'en_US', localesidkey='en_US', profileid = p.id, timezonesidkey = 'Asia/Shanghai', username='standarduser@testorg1.com',managerid=u3.id);
        insert u1;
         User u2 =new User (alias = 'new', email = 'shlia@isoftstone.com', emailencodingkey='UTF-8', lastname = 'Testing', languagelocalekey = 'en_US', localesidkey='en_US', profileid = p.id, timezonesidkey = 'Asia/Shanghai', username='new@testorg1.com',managerid=u1.id);
        insert u2;
        
        system.runas(u2){
                marketdynamic__c md=new  marketdynamic__c();
                insert md;
                md.ownerid=u1.id;
                update md;
        }
     }
 }